In modern portable electronic devices, it is possible to store various information. A part of the information may be such that the user does not wish it to be accessible to unauthorized persons. There is thus a need to encrypt this information in some way. Such information may include, for example, user identifications, passwords, addresses, personal data, client registers, application software, databases, etc. Present data encryption methods are normally based on a password. It may also be possible to transfer encrypted data to another device and open it also there if the correct password has been communicated. In some devices, it is possible to use data encryption by the device, wherein the device comprises the necessary functions to conceal the data. However, it is not possible or reasonable to implement such an arrangement in all devices, wherein encryption by software may be used. In encryption by software, an encryption algorithm is used, in which e.g. the user of the device enters an encryption key (a password), after which the data is encrypted by the encryption algorithm. The encrypted data can thus be decrypted in a corresponding manner with a decryption key and a decryption algorithm. In symmetric encryption, the encryption key and the decryption key are the same, as are often also the encryption algorithm and the decryption algorithm. In asymmetric encryption, however, different keys are used for encryption and decryption.
For reasons of safety, users typically select poor passwords which are easy to remember but which are, at the same time, vulnerable to various attacks. Furthermore, the passwords are often words of some language, proper names, dates, etc. Thus, the password can be determined, for example, by a so-called dictionary attack in which the dictionaries of one or more languages are used and, by trying words found in them, attempts are made to find out the correct password. Another alternative to find out the password is to try a mass of random passwords (the “brute force” method). If the length of the password is only a few characters, the above-mentioned method may be successful in finding the correct password relatively quickly with computers, or the like, which are nowadays available.